﻿
namespace Library.Distributed
{
    /// <summary>
    /// A distributed object.
    /// </summary>
    public interface IDistributed
    {
        /// <summary>
        /// The identifier of the distributed object.
        /// </summary>
        object ObjectId { get; }

        /// <summary>
        /// The context that the distributed object is stored upon.
        /// </summary>
        Context Context { get; }

        //bool HasLocal { get; }

        /// <summary>
        /// The local object of the distributed object on the calling node, if the distributed object is stored upon the calling node.
        /// </summary>
        object Local { get; }
    }

    /// <summary>
    /// A distributed object.
    /// </summary>
    public interface IDistributed<out T> : IDistributed
    {
        /// <summary>
        /// The local object of the distributed object on the calling node, if the distributed object is stored upon the calling node.
        /// </summary>
        new T Local { get; }
    }
}
